import React, { Component } from 'react'

export class Child extends Component {
  render() {
    return (
      <div className="child">
        <h1>{this.props.money}</h1>
        <button onClick={() => this.props.giveMoney(300)}>xx</button>
      </div>

    )
  }
}

export default Child